package com.jianzhi.lib.log.service

import android.os.Handler
import android.os.Looper
import android.os.Message
import java.lang.ref.WeakReference

class ServiceHandler(service: UploadService) : Handler(Looper.getMainLooper()) {

    private val reference = WeakReference(service)

    override fun handleMessage(msg: Message) {
        reference.get()?.doUpload()
    }

    companion object {
        const val WHAT_DO_UPLOAD_LOG = 0x01
    }
}